<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>position_fixed</title>
    <style>
        body{
            height: 3000px;
        }
        .per{
            width: 300px;
            height: 300px;
            background: red;
            position: relative;
        }
        .test{
            width: 100px;
            height: 100px;
            background: pink;
            position: fixed;
            left:0;
            top: 0;
        }
        .son{
            width: 100px;
            height: 100px;
            background: blue;
            position: inherit;
            left:100px;
            top: 100px;
        }
    </style>
</head>
<body>
    <div class="per">
    <div class="son"></div>
    </div>
    <div class="test"></div>
</body>
</html>